/*eslint-disable*/
import { createStore } from "vuex";

export default createStore({
    state: {
        people: {},
        tempStorageB: {},
        buildingSubList: [],
        fromClick: false,
        fromPeople: false,
        fromNet: false,
        polygon: {},
        peopleInNet: [],
        buidlingsInNet: [],
        POIFeatures: [],
        cameraRotation: false,
        polygonCut: false,
        clickToBuilding: false,
        searchShowController: false
    },
    mutations: {
        changeSearchShowController(state, data) {
            state.searchShowController = data
        },
        changeClickToBuilding(state, data) {
            state.clickToBuilding = data
        },
        changePolygonCut(state, data) {
            state.polygonCut = data
        },
        changeCameraRotation(state, data) {
            state.cameraRotation = data
        },
        savePOI(state, data) {
            state.POIFeatures = data
        },
        renewBuildingsInNet(state, data) {
            state.buidlingsInNet = data
        },
        pushPeopleInNet(state, data) {
            state.peopleInNet.push(data)
        },
        clearPeopleInNet(state, data) {
            state.peopleInNet = []
        },
        savePolygon(state, data) {
            state.polygon = data
        },
        StorageP(state, data) {
            state.people = data
        },
        tempStorageB(state, data) {
            state.tempStorageB = data
        },
        clearDataP(state, data) {
            state.people = {}
        },
        clearDataB(state, data) {
            state.tempStorageB = {}
        },
        clearData(state, data) {
            state.tempStorageP = {}
            state.tempStorageB = {}
        },
        updateSubList(state, data) {
            state.buildingSubList = data
        },
        clearSubList(state, data) {
            state.buildingSubList = []
        },
        isFromClick(state, data) {
            state.fromClick = data
        },
        isFromPeople(state, data) {
            state.fromPeople = data
        },
        isFromNet(state, data) {
            state.fromNet = data
        }
    },
    actions: {},
    modules: {}
});